package cc.mrbird.unit.service;

import cc.mrbird.common.domain.QueryRequest;
import cc.mrbird.grid.domain.GridInfo;
import cc.mrbird.unit.domain.UnitType;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;
@CacheConfig(cacheNames = "UnitTypeService")
public interface UnitTypeService {
    List<UnitType> findAllList(UnitType unitType, QueryRequest request);
    UnitType findByName(String unit_name);
    @CacheEvict(allEntries = true)
    void add(UnitType unitType);
    @CacheEvict(key = "#p0", allEntries = true)
    void update(UnitType unitType);
    @CacheEvict(key = "#p0", allEntries = true)
    void delete(String ids);
    @Cacheable(key = "#p0")
    public UnitType findById(Long id);
}
